home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / C and C++ / POSIX / ThinkCPosix / mktemp.c < prev    next >
Text File  |  1992-09-11  |  280b  |  17 lines

  1. /* $Id: $ */
  2.  
  3. /*
  4.  * This presently overwrites the contents of template.
  5.  */
  6.  
  7. #include "ThinkCPosix.h"
  8.  
  9. char *mktemp(char *template)
  10. {
  11.     if (template == NULL || strlen(template) < 8) {
  12.         fprintf(stderr, "mktemp: template too short\n");
  13.         return NULL;
  14.     }
  15.     return tmpnam(template);
  16. }
  17.